package org.tea.inventory.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author hzy
 * @description: 员工入职状态
 * @date: 2023/6/7 10:29
 */
public enum StaffStatusEnum {
    SZZ("00", "入职中"),
    ZZ("10", "在职"),
    LZ("20", "离职"),
    TY("40", "退养"),
    TX("50", "退休"),
    SY("60", "试用"),
    SX("70", "实习"),
    TZ("80", "停职"),
    LQ("90", "录取"),
    FQRZ("11", "放弃入职"),
    ;

    @Getter
    @Setter
    private String code;
    @Getter
    @Setter
    private String content;


    StaffStatusEnum(String code, String content) {
        this.code = code;
        this.content = content;
    }

    public static String getContentByName(String code) {
        for (StaffStatusEnum statusEnum : StaffStatusEnum.values()) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum.getContent();
            }
        }
        return "";
    }
}
